import moment from 'moment'

// dateformat
const DATE_FORMAT = 'YYYY-MM-DD'
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'

export const url = (p: string) => `/service${p}`
export const formatDateTime = (strDate: string) => moment(strDate).isValid() ? moment(strDate).format(DATE_TIME_FORMAT) : strDate
